% TODO proof-reading
\subsection{Calling beep()}

This is a simple calling of two functions without arguments:


\begin{lstlisting}[style=customjava]
	public static void main(String[] args)
	{
		java.awt.Toolkit.getDefaultToolkit().beep();
	};
\end{lstlisting}

\begin{lstlisting}
  public static void main(java.lang.String[]);
    flags: ACC_PUBLIC, ACC_STATIC
    Code:
      stack=1, locals=1, args_size=1
         0: invokestatic  #2      // Method java/awt/Toolkit.getDefaultToolkit:()Ljava/awt/Toolkit;
         3: invokevirtual #3      // Method java/awt/Toolkit.beep:()V
         6: return        
\end{lstlisting}

First \TT{invokestatic} at offset 0 calls\\
\TT{java.awt.Toolkit.getDefaultToolkit()}, 
which returns a reference to an object of class \TT{Toolkit}.\\
The \TT{invokevirtual} instruction at offset 3 calls the \TT{beep()} method of this class.

